﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace LanguageFeatures.Models
{
    //public class ShoppingCart
    //{
    //}
    //上面三行是默认产生的-先忽略它

    public class ShoppingCart: IEnumerable<Product>{ 
    public List<Product> Products { get; set; }

        public IEnumerator<Product> GetEnumerator()
    {
        return Products.GetEnumerator();

    }

    IEnumerator IEnumerable.GetEnumerator()
    {
        return GetEnumerator();
    }

    }

}